package cn.cqvie.common;

/**
 * 让线程存储用户id，提供存储id和获取id方法
 */
public class BaseContext {
    public static ThreadLocal<Long> threadLocal=new ThreadLocal<>();

    public static void setEmployeeId(Long id){
        threadLocal.set(id);
    }
    public static Long getEmployeeId(){
        return threadLocal.get();
    }

    public static void setUserId(Long id){
        threadLocal.set(id);
    }
    public static Long getUserId(){
        return threadLocal.get();
    }
}
